﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Neits.Common;
using Neits.UserService;

namespace Projecturo.Model
{
    public class Ticket : IInstanceIdentifier, IHasDataContext, ICreated, IChanged, IName, IDescription
    {
        #region IInstanceIdentifier Member

        public virtual long Id
        {
            get;
            set;
        }

        #endregion

        #region IHasDataContext Member

        public virtual IDataContext DataContext
        {
            get;
            set;
        }

        #endregion

        #region ICreated Member

        public virtual DateTime CreateDate
        {
            get;
            set;
        }

        public virtual IUser CreatedBy
        {
            get;
            set;
        }

        #endregion

        #region IChanged Member

        public virtual DateTime ChangeDate
        {
            get;
            set;
        }

        public virtual IUser ChangedBy
        {
            get;
            set;
        }

        #endregion

        #region IName Member

        public virtual string Name
        {
            get;
            set;
        }

        #endregion

        #region IDescription Member

        public virtual string Description
        {
            get;
            set;
        }

        #endregion

        public virtual TicketType Type { get; set; }
        public virtual TicketPriority Priority { get; set; }
        public virtual TicketState State { get; set; }
        public virtual Category Category { get; set; }

        public virtual IUser AssignedTo { get; set; }
        public virtual Version Version { get; set; }
        public virtual Project Project { get; set; }
        public virtual Int16 ExpectedEffortHours { get; set; }
        public virtual IList<Note> Notes { get; set; }
        public virtual IList<TimeRecord> TimeRecords { get; set; }
        public virtual Milestone Milestone { get; set; }
    }

    public enum TicketType
    {
        Feature = 1,
        Issue = 2,
        Task = 3,
    }

    public enum TicketPriority
    {
        Low = 1,
        Medium = 2,
        High = 3,
    }
}
